package com.sc.mapper.mapperhand;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;

import com.sc.pojo.AppointmentEC;
import com.sc.pojo.Employee;

@Mapper
public interface HandappointmentECMapper {
    int deleteByPrimaryKey(Integer lid);

    

    int insertSelective(AppointmentEC record);

    AppointmentEC selectByPrimaryKey(Integer lid);

    int updateByPrimaryKeySelective(AppointmentEC record);

    int updateByPrimaryKeyWithBLOBs(AppointmentEC record);

    int updateByPrimaryKey(AppointmentEC record);

    /**
     * Q -start
     * */

    // 查询一个客户预约完成记录
    List<AppointmentEC> selectAppByLapp(Integer cid);

    // 查询所有客户预约完成记录
    List<AppointmentEC> selectAppAll();

    // 查询所有客户预约处理记录
    List<AppointmentEC> selectByAll();

    // 查询一个客户预约处理记录
    List<AppointmentEC> selectByCid(Integer cid);
    
    //根据客户名称查询客户id
    Integer selectCidByName(String name);
    
    //修改预约状态或修改时间
    int  updateAppoinmentAndDate(Map<String,Object> map);
    

    /**
     * Q -end
     * */

    /**
     * 查询每个员工当天预约完成量
     */
    List<AppointmentEC> selectAppointmentECByDay();

    /**
     * 查询每个员工当周预约完成量
     */
    List<AppointmentEC> selectAppointmentECByWeek();

    /**
     * 查询每个员工当月预约完成量
     */
    List<AppointmentEC> selectAppointmentECByMonth();

    /**
     * 查询每个员工上月预约完成量
     */
    List<AppointmentEC> selectAppointmentECByUpMonth();

    /**
     * 查询每个员工当季度预约完成量
     */
    List<AppointmentEC> selectAppointmentECByQuarter();

    /**
     * 查询每个员工上季度预约完成量
     */
    List<AppointmentEC> selectAppointmentECByUpQuarter();

    /**
     * 查询每个员工当年度预约完成量
     */
    List<AppointmentEC> selectAppointmentECByYear();

}
